<?php
function smarty_function_header($params, &$smarty)
{
   if($params["location"]) {
    session_write_close();
    header("location: ".$params["location"]);
    exit();
  }
}
?>

